import Mock from 'mockjs'
import { apiPrefix } from "@/api/config";

// 定义登录用户
const LoginUser={
    id:1,
    account:'admin',
    name:'极品橘子',
    realName:'刘君君',
    password:'123456'
}

//自动生成用户列表

const Users = [];
for (let i = 0; i < 20; i++) {
    Users.push(Mock.mock({
        id: Mock.Random.id(),
        'role|1':["admin","admin1","admin2"],
        name:Mock.Random.first(),
        realName:Mock.Random.cname(),
        sex: Mock.Random.integer(0, 1),
        date:Mock.Random.date(),
        state:Mock.Random.integer(0, 2)
    }));   
}

console.log("sdfsdsdfsf");

Mock.mock(apiPrefix+'users','get',function(){
    debugger;
     return  Users;
})